def numJewelsInStones(jewels: str, stones: str) -> int:
    return sum(s in jewels for s in stones)

def numJewelsInStones1(self, jewels: str, stones: str) -> int:
    jewelsSet = set(jewels)
    return sum(s in jewelsSet for s in stones)
